package test.y2020;

import cn.hutool.core.lang.Console;
import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2020/8/19 17:38
 */
public class August3 {
    public static void main(String[] args) {

        liebiao liebiao = new liebiao();
        List<String> strings = new ArrayList<>(Arrays.asList("123", "456", "789"));

        liebiao.setA(strings);
        liebiao.setB(strings);

        /* 下面这种方法才不会被清除 */
        /*    liebiao.setB(new ArrayList<>(strings));*/

        liebiao.getB().clear();
        Console.error(liebiao.getA());
    }
}

@Data
class liebiao {

    private List<String> a;
    private List<String> b;

}
